Skip to content

fix(service-automation)!: the inbound hook door refuses the address of a flow slot whose package is disabled, before anything is enqueued (ADR-0150 D5) - #34278

Merged
objectstack-fleet[bot] merged 20 commits into
mainfrom
claude/area-A5b-33906
Nov 16, 2026
Merged

objectstack-fleet[bot] merged 20 commits into
mainfrom
claude/area-A5b-33906

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread
Fixes #33906

Clause-②: no (narrowing)
Metadata-protocol: none
Skills-docs: follow-up owed — skills/objectstack-automation/SKILL.md:383-395

BREAKING for a sender that posts to the inbound hook of a flow whose package is disabled while the automation engine still holds that flow's slot (the disable's re-sync failed or did not run, or the disable came with no announce). The door answered 202 Accepted, queued the post, and the queued run was then skipped: the event was lost while the sender was told it was accepted. It now answers the door's one refusal, 401 INVALID_SIGNATURE, the bytes the same address gets once the re-sync has withdrawn the slot. Senders that retry on a non-2xx keep the event and can redeliver after a re-enable. Remedy: enable the package; the address answers 202 again with no re-arm. Nothing durable moves, so nothing is migrated (ADR-0087: not-required (no-migration-prescription)).

维护者速读

  • 改了什么:入站 hook 的地址指向"包已停用、但引擎仍挂着其流程槽位"的流程时,入口不再回 202 受理,而是回入口唯一的 401 拒绝(读完整个请求体之后),不入队;两种托管形态(自托管挂载与托管分发)都一样。原因只写服务器日志(cause: 'disabled-holder'),不告诉发送方。
  • 为什么改:之前入口回 202,随后排队的运行被跳过,发送方以为已处理,事件静默丢失。按座席裁决 6898449441(方案 A,沿用裁决 6884403301 第 2、3、8 条):停用包的槽位不接受任何地址,与重同步撤回槽位后的回答逐字节相同。
  • 风险与回滚:破坏性收窄(标题带 !),只影响"包已停用但重同步没撤掉槽位"的流程的 hook 地址;会在非 2xx 时重试的发送方可在重新启用后补投,不重试的发送方这段时间的事件会被拒收(之前是被假受理后丢弃)。共享名的裸 hook、在服务的同名包、无包流程、用槽位开关关掉的流程,回答都不变。回滚即还原本 PR。
  • 先看:packages/services/service-automation/src/engine.ts 的 inboundHookSlot(两处新判断:单一持有者分支、地址选定槽位之后)与新增的 disabledHolderHookRefused;测试 packages/qa/dogfood/test/inbound-hook-disabled-holder-33906.test.ts。
  • 两分钟验证:pnpm --filter @objectstack/dogfood exec vitest run --project isolated --maxWorkers=2 test/inbound-hook-disabled-holder-33906.test.ts(需先构建依赖),预期 6 个用例全部通过。
  • 需要你做的:无,席位落地。

What changes

AutomationEngine.inboundHookSlot (both faces of the inbound hook door ask it before the signature is read) now asks isDisabledHolderSlot, the predicate the trigger's fire-time skip already asks (PR #33890, extended to a name one package holds by PR #34048):

  • A name two packages hold: once the qualified address has picked its slot (the namespace's package), a slot whose package is disabled answers unadmitted. The slot is judged after the pick, so no other holder is served in its place (amendment 8: admission is judged on the slot that would execute).
  • A name one package holds (the door previously answered undefined and judged it as before): a disabled sole holder answers unadmitted for every address, the bare one included.

unadmitted is the door's existing answer: the self-hosted mount (ApiTriggerPlugin) and the hosted face (handleInboundHookRequest in the runtime, and the trigger-api member for the bare hook) read the body in full and answer inboundHookRefusal(), 401 INVALID_SIGNATURE. No door file changes. The engine logs the real cause at info, once per refused post, with { cause: 'disabled-holder', flow, package, slot }; the door's own line still logs unadmitted-address (qualified) or unknown-flow (bare). Nothing is enqueued.

The question is asked at post time, so the enable serves the address again with no re-arm.

Not moved: the bare hook of a name two packages hold stays the shared-name refusal (PR #33646 "Not moved"); the served co-holder beside a disabled one, a flow no package ships, and a flow switched off with toggleFlowSlot (its address still routes to its slot: flow-triggers-per-slot.test.ts:198-210, untouched) answer as before.

Tests

New file packages/qa/dogfood/test/inbound-hook-disabled-holder-33906.test.ts (6 tests). The rig: the real AutomationEngine built by the real AutomationServicePlugin.init() (so its flow-name resolver is the plugin's own) over a real SchemaRegistry; the real ApiTriggerPlugin mounting the self-hosted routes and registering the trigger-api member; the real runtime HttpDispatcher as the hosted face over a kernel with no http.server; a queue that hands each message to the trigger's consumer at once, so a run is observed. Each post is signed with the hook's correct secret, so the disable is the only reason for a refusal.

  • red line: the disabled co-holder's qualified address answers the one refusal on both faces, byte-identical (status, headers, body) to inboundHookRefusalResponse() and to the same address after withdrawFlowSlot (the re-sync); nothing enqueued, nothing run; the cause is in the log only (the body names no package, namespace or disabled).
  • red line: both holders disabled: neither qualified address is served.
  • red line: a disabled sole holder: its qualified and bare addresses answer the same refusal on both faces, byte-identical to after the re-sync; nothing enqueued.
  • the enable: each address answers 202 and runs again; the active trigger bindings and the queue subscriptions are unchanged (no re-arm).
  • CONTROL: nothing disabled: every address answers 202 on both faces and runs.
  • CONTROL: the served co-holder beside the disabled one answers 202 on both faces and runs its own flow.

The file is new rather than a describe in flow-hook-per-slot.dogfood.test.ts because the order names it; that file's rig mounts only the self-hosted face.

Acceptance notes

  • Skills follow-up owed: skills/objectstack-automation/SKILL.md:383-395 (the area files that card).
  • The door's own log line for this refusal names a generic cause (unadmitted-address qualified, unknown-flow bare); the engine's disabled-holder line beside it is the true cause. Giving the door a cause of its own would add a member to UnverifiedPostCause in trigger-api and the runtime's door text, outside this claim.
  • The full PATCH-disable stack through a booted app was not measured (as in the measurement 6897225218); the armed-but-disabled state is reached in the rig with registry.disablePackage and no re-sync.

Verification

All readings are on head 84e37cab (the branch with origin/main merged in, #34048 included) unless a line says otherwise.

  • Pins: pnpm --filter @objectstack/dogfood exec vitest run --project isolated --maxWorkers=2 test/inbound-hook-disabled-holder-33906.test.ts: Test Files 1 passed, Tests 6 passed.
  • Dogfood battery (title has !): the dependency closure built (--filter '@objectstack/dogfood^...' build, exit 0), then pnpm --filter @objectstack/dogfood test under the verify lock: exit 0, Test Files 470 passed, 3 skipped (473); Tests 3980 passed, 42 skipped (4022); 2007 s.
  • @objectstack/service-automation: pnpm test: Test Files 284 passed, Tests 4040 passed (flow-triggers-per-slot.test.ts, the toggled-off slot pin at L198-210, untouched and green). pnpm typecheck: exit 0, test layer compiles.
  • Derived gates (dispatch-gates --commands, 76 families): 75 exit 0. check:dual-build-cjs-loads exit 3, PREREQUISITE NOT MET (it reads every package's dist/ and this tree built only the dogfood closure): NOT MEASURED here; CI runs it. --ran reconciliation: 76 derived, 76 run, 0 unrun. check:engine-double-contract was red on an earlier head (the rig's credential store pinned write verbs the ledger does not record); the store is now read-only, so no ledger row is owed, and the gate is green.
  • Declaration self-check: check-changeset-no-major, check-adr-0087-registration ([BREAKING+bang+clause-②-narrowing] not-required (no-migration-prescription)), check-closing-keyword-parity, check-partof-closing-keyword on this body: all exit 0. dispatch-gates --tier: no path-derived model mandate.
  • eslint on the two touched source files: exit 0. Repo-wide pnpm lint is left to CI.
Ablation: each leave-out put back, the pins go red (rebuilt, marker proved in dist/, restored)

Each leg went through scripts/ablation-replace.mjs (anchor hit 1 to 0, blob checked), then pnpm --filter @objectstack/service-automation build, then ablation-dist-preflight.mjs (marker present in dist/index.js and dist/index.cjs), then the pin file. Taken on aa16cc6e, before the merges, with the same engine hunk.

  1. The shared-name leave-out made inert (if (globalThis.__ABLATED_33906_SHARED__ === true && ...)): 3 failed, 3 passed. The red lines for the disabled co-holder, for both holders disabled, and for the enable go red, for example AssertionError: self-hosted: expected { status: 202, …(2) } to deeply equal { status: 401, …(2) }.
  2. The sole-holder leave-out made inert: 2 failed, 4 passed. The sole-holder red line and the enable go red: AssertionError: self-hosted {"ns":"alpha","flowName":"zz_disabled_alone"}: expected { status: 202, …(2) } to deeply equal { status: 401, …(2) }.

Restore: each blob equal to HEAD, git diff HEAD empty. A rebuild, then ablation-dist-preflight --absent for both markers: absent from all 6 built files, tree clean. The pin file: 6 passed.

Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3


🤖 Generated with Claude Code

…hose package is disabled

A slot of a flow name two packages hold is judged when its trigger fires:
while its package is disabled the run is skipped (said once at info), never
substituted, and it dispatches again on re-enable with no re-arm. Slot keys,
bindings and the dispatch holder do not move (ADR-0150 D3, seat ruling
6884403301 amendments 3 and 7).

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
…as a narrowing

The changeset carries Clause-② no (narrowing), the BREAKING banner, the
ADR-0087 not-required marker, and says an event fired while the package is
disabled is dropped, not replayed. The single-holder CONTROL reads "as on
main today".

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
…s alone is not dispatched by its trigger, and the bare entries answer as for no flow

A flow name one package holds, that package disabled while the engine still
holds its slot (a disable whose re-sync failed or did not run): its trigger
binding is not dispatched (said once at info), and execute, getFlow and
toggleFlow answer as for a flow the engine does not hold, which is what the
namespaced address answers. A re-enable dispatches it again with no re-arm.
The durable reads (slot key, dispatch holder, version history) do not move.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
…package also ships keeps its slot key and its trigger

A disable is reversible and moves no key. While the registry holds a flow
name under two packages and the others are disabled, the served package's
lone slot is filed, and stays, under PACKAGE/NAME: the boot pull files it so
beside a disabled holder, and the re-sync's withdrawal of the disabled
holder's slot no longer re-keys it to the bare name or stops its binding.
The M1 decline and its refused-body warning are kept for a body another
served package really had refused.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
# Conflicts:
#	packages/services/service-automation/src/engine.ts
#	packages/services/service-automation/src/flow-slots-per-package.test.ts
… once the disabled co-holder is uninstalled

A lone slot kept under PACKAGE/NAME beside a disabled co-holder now settles
back to the bare name at its next placement once the registry no longer
holds the name twice (the uninstall's re-sync re-registers it), through the
same record move a withdrawal uses. isShared reads the registry and the slot
count again, as on main: a name one package holds is never read as shared,
so removal, version history, rollback, withdraw, the bare inbound hook and
the credential source serve it.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
… holder's flow moves

The clone door's taken-name probe, the definition writes' rollback copy and
carried-forward credentials, and the DELETE door's answer all ask getFlow,
so they move with it; the changeset now says how. The runtime door pin gains
the clone door's source row.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
…ning co-holder and reached before the uninstall's re-sync

A lone slot filed under its qualified key beside a disabled co-holder is
declined only once another package's body of the name is recorded as
refused, so the enable's re-sync registering the served holder first arms
it with no refused-body warning. A co-holder that returns while the
incumbent is already qualified moves no key, so the incumbent's re-arm is
done where the move's would have been. A refusal recorded later still
declines it and says so.

The fold back to the bare name after the co-holder leaves the registry now
also happens the first time the engine fires the slot or reads its name
(the bare key resolvers and the inbound hook), not only at its next
placement, so a failed re-sync leaves no unreachable flow.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
…d co-holder, and the clone answer as ruled

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
…lder's slot before anything is enqueued

AutomationEngine.inboundHookSlot answers `unadmitted` for a slot whose
registry-held package is disabled (isDisabledHolderSlot): the qualified
address of a disabled co-holder's slot, and every address of a disabled
sole holder's flow. Both faces then answer the door's one 401 once the
body is read, the bytes the address gets after the disable's re-sync,
and nothing is enqueued whose run would be skipped. The cause is logged
at info, never sent. Asked at post time, so a re-enable serves the
address again with no re-arm.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
# Conflicts:
#	packages/services/service-automation/src/engine.ts
…d-only

The hook door writes no credential, so the store double carries no
write verb and owes no engine-double ledger row.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/service-automation, touching 3 documentable anchor(s).

1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/kernel/cluster.mdx (via AutomationEngine (symbol, a top-level class))

⛔ 3 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v16.mdx (via AutomationEngine (symbol, a top-level class))
  • content/docs/releases/v17/17-0.mdx (via AutomationEngine (symbol, a top-level class))
  • content/docs/releases/v17/17-6.mdx (via AutomationEngine (symbol, a top-level class))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 11 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json babda9d339b6e7c1ab0a527917edc2e8fb827bce → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 71f3a00e36602d555c3c900349c4d84d58442e1f — the merge of head 84e37cabec247f97fd422aa5bab72b37438f42a5 into base babda9d339b6e7c1ab0a527917edc2e8fb827bce, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 71f3a00e36602d555c3c900349c4d84d58442e1f && git checkout 71f3a00e36602d555c3c900349c4d84d58442e1f
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin babda9d339b6e7c1ab0a527917edc2e8fb827bce 84e37cabec247f97fd422aa5bab72b37438f42a5 && git checkout -B drift-repro babda9d339b6e7c1ab0a527917edc2e8fb827bce && git merge --no-ff 84e37cabec247f97fd422aa5bab72b37438f42a5

node scripts/docs-audit/affected-docs.mjs --json babda9d339b6e7c1ab0a527917edc2e8fb827bce

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs babda9d339b6e7c1ab0a527917edc2e8fb827bce → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jUZKdq3PK2Sab53cT3

Request: review · PR #34278 · area S6 · Fixes #33906 · head 84e37cab (declared final; 52 check-runs: 36 success, 16 skipped, 0 failure) · 2026-11-16T04:03Z

  • Ruling: seat ruling A 6898449441 (regraded p2 6898457477).
  • What it does: AutomationEngine.inboundHookSlot answers unadmitted for a slot whose registry-held package is disabled (isDisabledHolderSlot). On a shared name it is judged after the qualified address picks its slot (no substitution); on a name one package holds, every address of a disabled sole holder, bare included. Both faces answer the door's existing one 401 INVALID_SIGNATURE after the body is read in full, byte-identical to the post-re-sync answer, nothing enqueued; cause logged at info, never sent. Re-enable answers 202 with no re-arm. No door file changed.
  • Declarations: Clause-②: no (narrowing), Metadata-protocol: none, Skills-docs: follow-up owed — skills/objectstack-automation/SKILL.md:383-395 (filed as skills/objectstack-automation: the inbound hook section does not say that a disabled package's flow answers 401 at the hook door (after #33906) #34279). !, BREAKING banner, ADR-0087 marker not-required (no-migration-prescription), patch level, corrected sender sentence.
  • Owed: a CONTRACT_REVIEW_TIER record (narrowing declaration face) plus review-c's ACCEPT read.
  • Pins: new packages/qa/dogfood/test/inbound-hook-disabled-holder-33906.test.ts (6 tests, real engine + ApiTriggerPlugin + runtime HttpDispatcher, both faces). Ablations of both leave-outs red (3/6 and 2/6). service-automation 284 files / 4040 tests; dogfood battery 470 files / 3980 tests, green on this head.
  • Stated deviations: test file lives in qa/dogfood (only package reaching both faces); ablations taken at aa16cc6 with a byte-identical engine hunk; other direct dependents left to CI (no export or type change).
  • Dev report: 6906551199 on service-automation: the inbound hook door accepts a post for a disabled holder's flow slot whose queued run is then skipped (measure what the sender is told) #33906.
  • Review thread: review-c.

Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jRMKz5NhWVrE4E1U5x

Review claim · head 84e37ca · 2026-11-16T04:04Z (review-c, S6; L1 ACCEPT read + L2 CONTRACT_REVIEW_TIER record, narrowing face)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jRMKz5NhWVrE4E1U5x

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 84e37cabec247f97fd422aa5bab72b37438f42a5
Local-runs: none
Scope: packages/services/service-automation/src/engine.ts, packages/qa/dogfood/test/inbound-hook-disabled-holder-33906.test.ts + packages/triggers/trigger-api/src/plugin.ts, packages/triggers/trigger-api/src/api-trigger.ts, packages/runtime/src/domains/automation-hooks.ts, packages/core/src/security/inbound-hook-answer.ts, packages/services/service-automation/src/plugin.ts (flowNameResolver), packages/services/service-automation/src/flow-slots.ts, packages/services/service-automation/src/flow-triggers-per-slot.test.ts:198-210, packages/spec/src/contracts/trigger-api-service.ts, docs/adr/0150 (D3, D5), skills/objectstack-automation/SKILL.md:383-395 (all read in the cited code, none in the diff)

Read: card #33906 with its five comments (measurement 6897225218, ruling 6898449441, regrade 6898457477, claim 6903498595, dev report 6906551199), ruling 6884403301 as data, PR #34278 body and three files, the net diff against main (01598d93, merge-base 98a4449f; engine.ts on main differs from the head by this PR's hunk alone), and the 52 check-runs on the head: 36 success, 16 skipped, 0 failure.

① Derived judgments

  • Accept-set of the door, sole-holder branch (inboundHookSlot, !isShared): was undefined for every such name; now unadmitted when the name's one slot has a package and isDisabledHolderSlot(name, package) holds, else undefined as before. Right. A package-less slot, a name with no slot, and an engine with no resolver all keep undefined (flowSlotPackage answers undefined, or the predicate answers false).
  • Accept-set of the door, shared-name branch: was served whenever the qualified address picked exactly one key; now unadmitted when that key's package is disabled. Right. The check runs after the pick on the picked key, so no other holder is substituted (amendment 8); _env picks the package-less slot and stays served; the bare hook returns refused above the new code and is untouched; zero or two keys stay unadmitted.
  • Key shapes: flowSlotPackage(flowName) reads the bare key of an unshared name (after settleFlowName folds a lone qualified key back), and flowSlotPackage(keys[0]) reads a PACKAGE/NAME key from keysOf(flowName). Both return the slot's own packageId. Right.
  • Same predicate as the fire-time skip: both branches call isDisabledHolderSlot(bare name, slot package), the argument order triggerRun uses (slot.name, slot.packageId) and isDisabledSoleHolder uses. The door now refuses exactly the slots whose queued run triggerRun skips on main; it refuses no post that would have run. Right.
  • Callers: three, none changed. Self-hosted bare and qualified mounts hand any non-undefined answer to answerInboundHookSlot, which reads the body and answers the trigger's refusal. The trigger-api member does the same for the hosted bare hook. The hosted qualified face answers refuseUnaddressed (body read, inboundHookRefusalResponse()) for any answer that is not served. No caller reads the former undefined of a sole holder in another way; the only behaviour that moves is the intended one. Right.
  • Sender-visible surface: status, the one Content-Type header and the body are the door's existing 401 INVALID_SIGNATURE. Nothing in them names the package, the namespace or the disabled state; the cause is in the engine's info line only. The 503 residual and the 400 body arms sit behind the hook match, so a disabled holder no longer reaches them, as after the re-sync. Right.
  • Post-time question: isDisabledHolderSlot asks the resolver on every call and stores nothing; disabledHolderDispatchSaid is not touched. The enable answers 202 with no re-arm. Right.
  • Public surface: no export, type or return union changes (unadmitted was already a member); the lint-gate and type-check runs are green. disabledHolderHookRefused is private. Right.
  • Pins: the new file drives both faces with correctly signed posts and compares whole answers to inboundHookRefusalResponse() and to the post-withdrawFlowSlot answer. It lives in @objectstack/dogfood, whose shards run on the queue and on push, never on a pull request (ci.yml, the dogfood job's if:), so Dogfood Regression Gate is green here with its three shards skipped. No check-run on this head executed the file; its green reading is the dev's local battery (470 files, exit 0) and its first CI run is the queue build. Test Core (8 shards) is green, which covers flow-triggers-per-slot.test.ts:198-210 (a toggled-off slot still routes served) and the existing inboundHookSlot pins.

② Semver level

  • patch on @objectstack/service-automation is right: the only published source the diff moves is engine.ts, and AGENTS.md step 3 gives Metadata-protocol: none a patch, with a breaking non-protocol change keeping its banner and its ADR-0087 disposition. Metadata-protocol: none is right: nothing a metadata author can write changes.
  • ! in the title and the BREAKING banner are present in the PR body and the changeset, with the corrected sender sentence of ruling 6898449441 and the remedy (enable the package).
  • ADR-0087 not-required (no-migration-prescription) is right: no key, export, stored row, slot key or secret moves, and the state is reversible. One marker, in the changeset body, beside both declaration lines.
  • trigger-api and runtime carry no changeset and need none: their sources are unchanged.
  • Check Changeset, PR-body guards and Lint · repo & tooling gates are success on the head.

Clause-②: no (narrowing). Correct as declared: a sender-visible answer moves from 202 to 401 for the affected addresses.

③ Boundary flags

  • open_questions: empty. security_findings: none; this review found none either (see ④).
  • Deviation, test placement in packages/qa/dogfood: accepted. It is the one package that reaches the engine, the trigger plugin and the runtime dispatcher together. Its cost is stated in ①: no pull-request check-run runs it.
  • Deviation, ablations at aa16cc6e: accepted. The #33906 hunk of engine.ts is identical there and at the head (compared; the file otherwise differs only by an unrelated start-condition change merged from main). The pin file changed after the ablations by the read-only credential store alone.
  • Deviation, other direct dependents left to CI: accepted; Test Core and the type-check runs are green.
  • Deviation, the engine's cause line is per post, not once per slot: accepted. The door's own line is already per post, so the volume grows by a constant factor.
  • Deviations on commit trailers, merge-commit messages and repo-wide lint: no contract effect; Lint · ESLint is green.
  • Out-of-scope note, the door's generic cause: answered as N1 below. It has no carrier and one is owed.
  • Skills-docs: follow-up owed for SKILL.md:383-395: the lines say the endpoint ACKs 202 and enqueues, and do not mention a disabled package. The request names skills/objectstack-automation: the inbound hook section does not say that a disabled package's flow answers 401 at the hook door (after #33906) #34279 as the carrier; this review did not open it.
  • Not measured, stated by the dev: the full PATCH-disable stack through a booted app. The rig reaches the armed-but-disabled state with registry.disablePackage and no re-sync. Accepted as stated.

④ Design judgment

The change makes a declared refusal real; it takes no declared capability away. The published contract (ITriggerApiService.handleInboundHook) promises that a 202 means the payload is enqueued and the flow runs on the consumer, and gives every post that names no armed flow the one 401. ADR-0150 D3 as the resolver reads it, and ruling 6884403301 amendment 3, say a disabled package's slot gets no flow and no dispatch. On main the door answers 202 and triggerRun then drops the run, so the sender is told a thing the contract does not allow. No spec text declares that a disabled package's hook is served. The door now gives the answer the same address gets once the re-sync has withdrawn the slot. This is seat ruling A (6898449441) as written: amendments 2, 3 and 8 are each met, ADR-0150 D5's one refusal is kept, and the bare hook of a shared name is left where PR #33646 left it.

Attempts to break it, each read in the tree:

  • An environment-qualified address, a flow no package ships, and a toggled-off slot: unchanged, by flowSlotPackage answering undefined or the predicate answering false.
  • A served co-holder whose slot stays alone under its qualified key beside a disabled, withdrawn co-holder: isShared stays true through heldByMany, the shared branch picks the served key, and it is served.
  • A wrong-namespace or _env address of a disabled sole holder: unadmitted now, and the door's refusal before, the same bytes.
  • Unauthenticated learning of package state: every answer on the affected addresses is the one refusal, sent after the body is read, on both faces. The disabled address moves into the class the unarmed address is already in, the class it joins after the re-sync. No new sender-visible distinction; no security-class finding, so no mechanism file is written.
  • A post admitted just before the disable, or already queued: still 202 and still skipped at fire time. The fire-time skip stays, so nothing runs for a disabled package.

No must-fix, no should-fix.

N1 (nit) — The door's own warn line for this refusal states a cause that is not the true one: unadmitted-address says the qualifier does not name the package that ships the flow (it does), and unknown-flow says no hook is armed (one is), and both say the line is the only record of the cause. The true cause is the engine's info line, so a log read at warn shows the wrong diagnosis. The same generic lines are what the address logs after the re-sync, the wire answer is unaffected, and the ruling's "cause logged, never sent" is met. The comments in trigger-api/src/plugin.ts:20-24 and runtime/src/domains/automation-hooks.ts that say undefined covers every unshared name are stale for the same reason. Fix belongs to a follow-up card (a disabled-holder member of UnverifiedPostCause and the runtime door text); none is filed.

N2 (nit) — The inboundHookSlot jsdoc says no post is accepted whose run triggerRun would then skip. A post admitted just before the disable is still skipped at fire time. Accepted deviation; the code is correct.

N3 (nit) — The engine's line also fires for an address that would be refused with the package enabled (a wrong namespace on a disabled sole holder), and its text speaks of redelivery after the enable. Log wording only; accepted deviation.

Implemented-by: claude/area-A5b-33906
Reviewed-by: session_01QsR2jRMKz5NhWVrE4E1U5x

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jRMKz5NhWVrE4E1U5x

Review — PASS

Head-sha: 84e37cabec247f97fd422aa5bab72b37438f42a5
Reviewer: review-c · read 2026-11-16T04:11Z · first round; claim 6906956646
Implemented-by: claude/area-A5b-33906 · Reviewed-by: session_01QsR2jRMKz5NhWVrE4E1U5x
Contract-review record at this head: 6907077760 (CONTRACT_REVIEW_TIER from an isolated sub-agent, adopted). VERDICT PASS, no must-fix, no should-fix.

What I checked:

  • Seat ruling A (6898449441), as written. The door refuses exactly the slots whose queued run triggerRun skips on main, and no post that would have run. It uses the same isDisabledHolderSlot predicate with the same argument order. The shared-name check runs after the qualified address picks its one key, so no co-holder is served in its place. The bare hook of a shared name, _env, a flow no package ships and a toggled-off slot all answer as before.
  • Both faces. All three callers of inboundHookSlot are unchanged. Each one reads the body in full and then answers the one 401 INVALID_SIGNATURE, the same bytes the address gets after the re-sync, with nothing enqueued. Nothing sender-visible names the package, the namespace or the disabled state.
  • Re-enable. The question is asked at post time with nothing cached, so the address answers 202 again with no re-arm.
  • Declarations.
  • Checks: 52 check-runs, 36 success and 16 skipped, none red; mergeable_state: clean.
    • The new dogfood pin file runs on the queue and on push, never on a pull request, so no check-run on this head has executed it yet. Its green reading so far is the area's local battery. The merge queue is its first CI run.

Follow-up owed (N1, needs a card): the door's own warn line for this refusal names a generic cause (unadmitted-address / unknown-flow) that is not the true one; the true cause is only in the engine's info line. Two comments are stale for the same reason: trigger-api/src/plugin.ts:20-24 and the one in runtime/src/domains/automation-hooks.ts both say undefined covers every unshared name. The fix is a disabled-holder member of UnverifiedPostCause and the runtime door text. Please file that card; no head moves.

Accepted nits:

  • N2: the jsdoc says no post is accepted whose run is then skipped, but a post admitted just before the disable is still skipped at fire time. The code is correct.
  • N3: the engine's line also fires for a wrong-namespace address of a disabled sole holder. This is log wording only.

Not governed: the area lands this PR per landing-operations.md.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jUZKdq3PK2Sab53cT3

席位核对

ACCEPT · area S6 lands PR #34278 at head 84e37cab · 2026-11-16T04:12Z

reading result
check-governed-merges.mjs --pr 34278 (full output read) NOT governed, 0 of 3 paths; +410 / -2 ≤ 3000
check-runs on this head 52: 36 success, 16 skipped, 0 failure, 0 pending

Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

1 participant